   Help for ZipInf

ZipInf is a Visual Basic custom control that lets you find out what files are in the ZIP file and lots of information about those files.

Registration Information

Order Form

Getting Custom Controls Written

Properties

Methods


Properties

ZipInf supports the following standard properties: Name, Tag, Left, Top, Align, and Enabled.

ZipInf also supports the following custom properties:

DateFormat

FileComment

FileName

ItemCompressed

ItemCRC

ItemDate

ItemFileComment

ItemFileName

ItemMethod

ItemTime

ItemUncompressed

ListCount


DateFormat Property

Description

Determines the format of the date used by the ItemDate property.

Usage

[form.][label.]DateFormat[ = date$]

Remarks

Setting this property determines the format of the date used by the ItemDate property.  This can be used to override the international settings found in WIN.INI.  Using this property can ensure that you always get a date formatted in a specific fashion. If you leave it to the format found in WIN.INI, you'll have to figure out what format (i.e., MM/DD/YY, DD/MM/YY, or YY/MM/DD) it is.

This string can consist of punctuation and symbols.  The symbols are:

Symbol	Meaning

d	Day of the month: 1 - 31

dd	Day of the month: 01-31

m	Month of the year: 1 - 12

mm	Month of the year: 01-12

yy	Year: 00-99

yyyy	Year: 1970 - 2099

More information about this format can be found in the Windows Resource Kit under [intl] Section, and in the VB Programmer's Guide under Format$.

Examples

Let's say you want the date in an American format.  You would do:

ZipInf1.DateFormat = "mm/dd/yy"

Let's say you want the date in an American format with a four-digit year.  You would do:

ZipInf1.DateFormat = "mm/dd/yyyy"

Let's say you want the date in an European format.  You would do:

ZipInf1.DateFormat = "dd/mm/yy"

Data Type

String


FileComment Property

Description

Holds the comment field from the ZIP file.

Usage

[form.][label.]FileComment

Remarks

This property holds the comment string loaded from the ZIP file (specified by the FileName property).

This property is read-only.

Data Type

String


FileName Property

Description

Specifies the ZIP file to examine.

Usage

[form.][label.]FileName[= filename$]

Remarks

Setting this property causes ZipInf to load the ItemCRC, ItemCompressed, ItemDate, ItemFileName, ItemFileComment, ItemMethod, ItemTime, ItemUncompressed, FileComment, and ListCount properties.

If the file specified is not found, ZipInf will cause a File Not Found (7) error.  If the file speicified is not a ZIP file, ZipInf will cause a Not a ZIP file (29999) error.  If the ZIP file is corrupt, ZipInf will cause a Corrupt ZIP file (29998) error.

Data Type

String


ItemCompressed Property

Description

Tells the compressed size of a file in the ZIP file.

Usage

[form.][label.]ItemCompressed(FileIndex)

Remarks

This property tells the compressed size (i.e., how much space it takes up in the ZIP file) of the file specified by FileIndex.

This property is read-only and only available at run-time.

Data Type

Integer (long)


ItemCRC Property

Description

Tells the 32-bit CRC of a file in the ZIP file.

Usage

[form.][label.]ItemCRC(FileIndex)

Remarks

This property tells the 32-bit cyclic redundancy check (CRC) of the file specified by FileIndex.

This property is read-only and only available at run-time.

Data Type

Integer (long)


ItemDate Property

Description

Tells the date stamp of a file in the ZIP file.

Usage

[form.][label.]ItemDate(FileIndex)

Remarks

This property tells the date stamp on the file specified by FileIndex. The format of this property is determined by the short date format in WIN.INI and by the DateFormat property (which takes precedence).

This property is read-only and only available at run-time.

Data Type

String


ItemFileComment Property

Description

Tells the comment associated with a file in the ZIP file.

Usage

[form.][label.]ItemFileComment(FileIndex)

Remarks

This property tells the comment associated with the file specified by FileIndex.

This property is read-only and only available at run-time.

Data Type

String


ItemFileName Property

Description

Tells the name of a file in the ZIP file.

Usage

[form.][label.]ItemDate(FileIndex)

Remarks

The name of the file specified by FileIndex.

This property is read-only and only available at run-time.

Data Type

String


ItemMethod Property

Description

Tells what compression method was used for a file in the ZIP file.

Usage

[form.][label.]ItemMethod(FileIndex)

Remarks

This property tells the compression method used on the file specified by FileIndex.  The compression methods used are:

Method	Description

0	No compression (Stored)

1	Shrunk

2	Reduced

3	Reduced

4	Reduced

5	Reduced

6	Imploded

7	Tokenized (not used)

8	Deflated

This property is read-only and only available at run-time.

Data Type

Integer


ItemTime Property

Description

Tells time-stamp of a file in the ZIP file.

Usage

[form.][label.]ItemTime(FileIndex)

Remarks

This property tells the time stamp on the file specified by FileIndex.  Its format is HH:MM:SS (i.e., like the default Time$ format).

This property is read-only and only available at run-time.

Data Type

String


ItemUncompressed Property

Description

Tells the full size of a file in the ZIP file.

Usage

[form.][label.]ItemUncompressed(FileIndex)

Remarks

This property tells the full size (uncompressed, in bytes) of the file specified by FileIndex.

This property is read-only and only available at run-time.

Data Type

Integer (long)


ListCount Property

Description

Specifies how many files are within the ZIP file.

Usage

[form.][label.]ListCount

Remarks

This property gets set when the FileNamepropFileName property is set.  This property tells how many files are in the ZIP file.  The information about the individual files can be accessed through the following properties: ItemCRC, ItemCompressed, ItemDate, ItemFileName, ItemFileComment, ItemMethod, ItemTime, and ItemUncompressed.

If the file currently selected is not a ZIP file or if the file specified doesnt exist, this property will be set to -1.

This property is read-only.

Data Type

Integer


Methods

ZipInf only supports the Clear method.  Clear removes all infomationabout the ZIP file selected by the FileName property.  Then, it clears the FileName property.


 ZipInf Order Form

Use the Print Topic... command from the File menu to print this order form.

Mail this	James Shields

form to:	Mabry Software

Post Office Box 31926

Seattle, WA  98103-1926

Fax: 206-632-0272

CompuServe: 71231,2066

Internet: mabry@halcyon.com

MAKE CHECKS AND MONEY ORDERS OUT TO: James Shields

Where did you get this copy of ZipInf?

_______________________________________________________________

Ship to:	_______________________________________________________________

_______________________________________________________________

_______________________________________________________________

_______________________________________________________________

_______________________________________________________________

Phone:	_____________________________

Fax:	_____________________________

CompuServe:	_____________________________

Internet:	_____________________________

qty ordered	_____	REGISTRATION

$10 each, postpaid (check or money order in hard currency).  Foreign addressed add $2.00 shipping.  No additional shipping charges to Canada or Mexico.

qty ordered	_____	SOURCE CODE AND REGISTRATION

$35 each, postpaid  (check or money order in hard currency).  Foreign addresses add $5.00 shipping.  No additional shipping charge to Canada.


About ZipInf

ZipInf was written by James Shields.  Inquiries can be sent to 71231,2066 on CompuServe, or mabry@halcyon.com on Internet.  If you must send something via U.S. Mail, the address is:

James Shields

Mabry Software

P.O. Box 31926

Seattle, WA  98103-1926

You can register this program by sending $10 ($12 for international orders) and your address.  CompuServe members may register by sending $5 and their account number (the registered version will be E-mailed to you).  CompuServe members may also register this package by going to the SWREG forum.  ZipInf is registered there.  ZipInfs registration ID number is 1595.

Source code (which includes a registered copy) to this control is available for $35 ($40 for international orders).  With source code you get a registered version of the control.  If you are a CompuServe member, you may get the source code in the Software Registration forum (GO SWREG) for $30.  Its registration number is 1596.

To make things easier for you, you can print out and fill in the order form included with this help file.

(C) Copyright 1993 by James Shields


Getting Custom Controls Written

If you or your organization would like to have custom controls written, contact either me or Zane Thomas (co-author of the Waite Group's VB How-To, 2nd Edition).  Here's how we can be reached:

James Shields

CompuServe: 71231,2066

Internet: mabry@halcyon.com

Phone: 206-634-1443

Fax: 206-632-0272

BBS: 206-634-0783

US Mail: P.O. Box 31926; Seattle, WA 98103-1926

Zane Thomas:

CompuServe: 72060,3327

US Mail: P.O. Box 300; Indianola, WA  98342